package models;

import javax.persistence.Entity;

import play.db.jpa.Model;

@Entity
public class UserConfig extends Model{
    
    
    private String propertyKey;
    private String propertyValue;
    private String description;
    
    protected UserConfig(){}
    
    @Override
    public String toString() {
        return "Userconfig [propertyKey="+propertyKey+" propertyValue="+propertyValue+" description="+description+"}";
    }

    public static UserConfig getProperty(String key){
        return find("SELECT c FROM UserConfig c WHERE c.propertyKey=?1", key).first();
    }
}
